package com.wan37.logic.email.domain.vo;

import com.wan37.logic.email.domain.entity.EmailDO;

import java.util.List;

/**
 * @author : luoyong
 * @date : 2020-07-28 10:01
 **/
public class EmailVO {
    private String emailId;
    private String senderId;
    private String senderName;
    private String content;
    private String receiverId;
    private long createTime;
    /**
     * 0 已领取
     * 1 未领取
     */
    private int isRead;
    private List<AttachmentVO> attachmentVOList;

    public EmailVO(){
        this.createTime = System.currentTimeMillis();
    }

    public EmailVO(EmailDO emailDO){
        this.emailId = emailDO.getEmailId();
        this.senderId = emailDO.getSenderId();
        this.content = emailDO.getContent();
        this.createTime = emailDO.getCreateTime();
        this.isRead = emailDO.getIsRead();
        this.receiverId = emailDO.getReceiverId();
    }

    public int getIsRead() {
        return isRead;
    }

    public void setIsRead(int isRead) {
        this.isRead = isRead;
    }

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public List<AttachmentVO> getAttachmentVOList() {
        return attachmentVOList;
    }

    public void setAttachmentVOList(List<AttachmentVO> attachmentVOList) {
        this.attachmentVOList = attachmentVOList;
    }

    public String getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(String receiverId) {
        this.receiverId = receiverId;
    }

    @Override
    public String toString() {
        return "EmailVO{" +
                "emailId='" + emailId + '\'' +
                ", senderId='" + senderId + '\'' +
                ", senderName='" + senderName + '\'' +
                ", content='" + content + '\'' +
                ", createTime='" + createTime + '\'' +
                ", attachmentVOS=" + attachmentVOList +
                '}';
    }
}
